/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.gen2phen.labs.domain;

import java.util.ArrayList;

/**
 *
 * @author pedrolopes
 *
 * GEN2PHEN Semantic Web Labs: Knowledge Mashup
 *
 */
public class Investigation {

    private int id;
    private String name;
    private String description;
    private ArrayList<ObservableFeature> features = new ArrayList<ObservableFeature>();

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public ArrayList<ObservableFeature> getFeatures() {
        return features;
    }

    public void setFeatures(ArrayList<ObservableFeature> features) {
        this.features = features;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Investigation(int id, String name, String description) {
        this.id = id;
        this.name = name;
        this.description = description;
    }

    public Investigation(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public void addFeature(ObservableFeature feat) {
        features.add(feat);
    }

    /**
     * Method overriden to include Investigation Description and associated Features when printing.
     * 
     * @return
     */
    @Override
    public String toString() {
        String result = "";

        result += "\n\t" + this.name + "\n" + this.description;

        if (!features.isEmpty()) {
            result += "\n** Features **";
            for (ObservableFeature feat : features) {
                result += "\n - " + feat.getName();
            }
        }

        return result;
    }
}
